<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <!-- <link rel="icon" href="images/icons/favicon.png"/> -->
        <title>会员中心</title>
        <link href="css/bootstrap.min.css" rel="stylesheet">
        <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <link href="css/style.css" rel="stylesheet">
        <link href="css/responsive.css" rel="stylesheet">
        <script src="js/jquery.min.js" type="text/javascript"></script>
        <script src="js/bootstrap.min.js" type="text/javascript"></script>
        <script src="https://cdn.jsdelivr.net/npm/vue"></script>
        <style>
            #page{
                background:#F8F8F8;
               
            }
            .header-container{
                background:white;

            }
          
        </style>
    </head>
    <body>
    <div id="page">
        <!--header--->
        <header class="header-container">
            <div class="container">
                <div class="top-row">
                    <div class="row">
                        <div class="col-md-2 col-sm-6 col-xs-6">
                            <div id="logo">
                                    <a href="index.html"><img src="images/logo.png" alt="logo" class="logo hidden-sm hidden-xs"></a>  
                                    <a href="index.html"><img src="images/flogo.png" alt="logo" class="logo"></a>                   
                            </div>                       
                        </div>
                        <div class="col-sm-6 visible-sm">
                                <div class="text-right search">
                                        <input type="text" placeholder="搜索课程名称">
                                        <img src="images/search.png" alt="">
                                        <div class="myava">
                                                <a href="" class="login">登录</a>/
                                                <a href="">注册</a>
                                                <!-- <a href="">hahah</a> -->
                                        </div>
                                        <img src="images/ava.png" alt="">
                                </div>
                        </div>
                        <div class="col-md-6 col-sm-12 col-xs-12 remove-padd">
                            <nav class="navbar navbar-default">
                                <div class="navbar-header page-scroll">
                                    <button data-target=".navbar-ex1-collapse" data-toggle="collapse" class="navbar-toggle" type="button">
                                        <span class="sr-only">Toggle navigation</span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                    </button>

                                </div>
                                <div class="collapse navigation navbar-collapse navbar-ex1-collapse remove-space">
                                    <ul class="list-unstyled nav1 cl-effect-10">
                                        <li><a  data-hover="首页" href="./index.html"><span>首页</span></a></li>
                                        <li><a data-hover="我的学习"  href="./mycourse.html"><span>我的学习</span></a></li>
                                        <li><a data-hover="我的收藏" href="./mycollect.html"><span>我的收藏</span></a></li>
                                        <li><a data-hover="消息"  href="./message.html"><span>消息</span></a></li>
                                        <li><a data-hover="会员中心"  class="active" href="./myvip.html"><span>会员中心</span></a></li>                                        
                                    </ul>
                                </div>
                            </nav>
                        </div>
                        <div class="col-md-4  col-sm-4 col-xs-12 hidden-sm">
                            <div class="text-right search">
                                <div class="research">
                                    <input type="text" placeholder="搜索课程名称">
                                    <img src="images/search.png" alt="">
                                </div>                                 
                                <div class="myava">
                                    <!-- <a href="" class="login">登录</a>/
                                    <a href="">注册</a> -->
                                    <a href="" class="username">hehe</a>
                                    <img src="images/ava.png" alt="" class="ava">
                                </div>
                            </div>
                            
                        </div>
                    </div>
                </div>
            </div>
        </header>
        <!--end-->
        <!-- 默认开通会员页面 -->
        <div class="vip_bg" v-if='kaitong' style="background-image:url('./images/vip.jpg');background-repeat: no-repeat;background-size:cover;">
            <div class="container">
                    <div class="vip_content">
                        <div v-for="(item,i) in vips" @click="getyellow(i,item.v_price)" :class="v_index==i? 'vip_item_active':'vip_item'" >
                            <div>
                                <span class="myred">￥</span><span class="myprice myred">{{item.v_price}}</span>
                                <p class="hour">{{item.v_time}}</p>
                                <div>
                                    <img src="./images/sx.png" alt="" class="sxk">
                                </div>
                            </div>
                        </div>
                        <!-- <div class="vip_item text-center">
                                <div>
                                    <span class="myred">￥</span><span class="myprice myred">30</span>
                                    <p class="hour">24小时</p>
                                    <div>
                                        <img src="./images/sx.png" alt="" class="sxk">
                                    </div>
                                </div>
                        </div>
                        <div class="vip_item text-center">
                                <div>
                                    <span class="myred">￥</span><span class="myprice myred">30</span>
                                    <p class="hour">24小时</p>
                                    <div>
                                        <img src="./images/sx.png" alt="" class="sxk">
                                    </div>
                                </div>
                        </div>
                        <div class="vip_item text-center">
                                <div>
                                    <span class="myred">￥</span><span class="myprice myred">30</span>
                                    <p class="hour">24小时</p>
                                    <div>
                                        <img src="./images/sx.png" alt="" class="sxk">
                                    </div>
                                </div>
                        </div> -->
                    </div>
                    <div class="kaitong" @click="getvip()">
                        马上开通VIP
                    </div>   
            </div>
        </div>
      <!--点击开通VIP后显示的内容--> 
        <div class="container" v-else='kaitong'>          
            <div class='kaitongvip'>
                <h3 class="text-center">- 开通VIP会员 -</h3>
                <div class="kaitong_items">
                    <div v-for="(item,i) in vips"  @click="getyellow(i,item.v_price)"  :class="v_index==i? 'kaitong_item_active':'kaitong_item'" class="kaitong_item ">
                        <div class="text-center">
                            <p class="times">{{item.v_time}}</p>
                            <p class="yiyuan">{{item.danjia}}</p>
                        </div>
                        <div class="total">
                            ￥{{item.v_price}}
                        </div>
                    </div>
                     </div>
                <div class="jiesuan">
                    <div class="choose">                   
                        <div>
                            <img @click="choosepay()" :src="weixin? './images/wx_active.png':'./images/wx.png'" alt="">

                            <img @click="choosepay()"  :src="ailipay? './images/aipay_active.png':'./images/aipay.png'" alt="">   
                        </div>
                        <div>
                            <p>总计：
                                <span class="buytotal" v-model="total">￥{{total}}</span>                         
                            </p>
                            <button class="buynow">立即支付</button>
                        </div>
                    </div>
            </div>
        </div>
   
        </div>
        <!-- footer-->     
        <footer>
            <div class="fpp">
                    <div class="fp" > 
                            <div class="footer_detal">
                                <img src="images/flogo.png" alt="">
                                <p>我的学习 | 我的收藏 </p>
                                <p>联系方式：028-84400396</p>
                                <p class="copyright">
                                    © Copyright 2016-现在 成都梅鑫商贸有限公司 版权所有 huke88.com  
                                </p>
                            </div>
                            <div class="erweima text-center">
                                <p class="focus">关注微信公众号</p>
                                <img src="images/erweima.png" alt="">
                            </div>
                    </div>
            </div>
                
        </footer>
   </div>
        <script>
    var app = new Vue({
        el: '#page',   
        data:{
            kaitong:true,   //
            v_index:'',   
            vips:[{v_price:30,v_time:1+"天",danjia:1+"元/天"},{v_price:60,v_time:1+"个月",danjia:1+"元/天"},{v_price:90,v_time:3+"个月",danjia:1+"元/天"}
            ,{v_price:120,v_time:6+"个月",danjia:1+"元/天"} ],  //会员类型
            total:30,    //会员总价
            weixin:true,  //默认为微信支付
            ailipay:false  //支付宝支付
           
        },
        methods:{
            // 选择项的样式变化及改变总价
            getyellow:function(a,b){
                console.log(a)   
                this.v_index=a
                this.total= b
                console.log(this.v_index,this.total)
            },
            // 控制页面显示的默认会员页面和点击马上开通后的样式页面
            getvip:function(){
                this.kaitong=false
            },
            // 选择支付方式的图片的样式
            choosepay:function(){
                console.log(1111);
                if(this.weixin == true && this.ailipay==false){
                    this.weixin=false;
                    this.ailipay=true
                }else{
                    this.weixin=true;
                    this.ailipay =false;

                }
            }
        }
    })
        </script>
    </body>
</html>
